﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
										xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
										xmlns:local="clr-namespace:Microsoft.Research.DynamicDataDisplay"
                                        xmlns:common="clr-namespace:Microsoft.Research.DynamicDataDisplay.Common">

    <Style TargetType="{x:Type local:Plotter}" x:Key="defaultPlotterStyle">
        <Setter Property="Background" Value="White"/>
        <Setter Property="BorderBrush" Value="Black"/>
		<Setter Property="ClipToBounds" Value="True"/>
    </Style>

	<!--Send feedback icon-->
    <Image x:Key="SendFeedbackIcon" Width="16" Height="16">
        <Image.Source>
            <DrawingImage>
                <DrawingImage.Drawing>
                    <DrawingGroup>
                        <DrawingGroup.Children>
                            <GeometryDrawing Brush="#FFFFD94D" Geometry="F1 M 5.125,10.0208L 26.7083,10.0208L 26.7083,21.6875L 5.125,21.6875L 5.125,10.0208 Z">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#FF000000"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="#FFFFE278" Geometry="F1 M 5.52083,21.2708L 15.9167,14.2292L 26.2708,21.2708">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#FF000000"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                            <GeometryDrawing Brush="#FFFFC800" Geometry="F1 M 5.45833,10.4583L 16,16.4375L 26.3958,10.4583">
                                <GeometryDrawing.Pen>
                                    <Pen LineJoin="Round" Brush="#FF000000"/>
                                </GeometryDrawing.Pen>
                            </GeometryDrawing>
                        </DrawingGroup.Children>
                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
        </Image.Source>
    </Image>

    <!--Plotter template-->
	<ControlTemplate TargetType="{x:Type local:Plotter}" x:Key="defaultPlotterTemplate">
        <common:NotifyingGrid Name="PART_ContentsGrid" Background="{TemplateBinding Background}" DataContext="{TemplateBinding DataContext}">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto"/>
                <RowDefinition/>
                <RowDefinition Height="auto"/>
            </Grid.RowDefinitions>

            <common:NotifyingStackPanel Name="PART_HeaderPanel" Orientation="Vertical" Grid.Row="0"/>

            <common:NotifyingGrid Name="PART_MainGrid" Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"/>
                    <RowDefinition/>
                    <RowDefinition Height="auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto"/>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="auto"/>
                </Grid.ColumnDefinitions>


				<common:NotifyingGrid Name="PART_CentralGrid" Grid.Column="1" Grid.Row="1" ClipToBounds="True" Background="Transparent">
					<common:NotifyingCanvas Name="PART_MainCanvas" Grid.Column="1" Grid.Row="1" ClipToBounds="True" Panel.ZIndex="1"/>
				</common:NotifyingGrid>

				<!-- Border of viewport -->
                <Rectangle Name="Border" Grid.Column="1" Grid.Row="1" Stroke="{TemplateBinding BorderBrush}" 
									 StrokeThickness="{TemplateBinding BorderThickness}"/>

                <common:NotifyingStackPanel Name="PART_LeftPanel" Grid.Column="0" Grid.Row="1" Orientation="Horizontal" Background="Transparent"/>
                <common:NotifyingStackPanel Name="PART_RightPanel" Grid.Column="2" Grid.Row="1" Orientation="Horizontal" Background="Transparent"/>
                <common:NotifyingStackPanel Name="PART_BottomPanel" Grid.Column="1" Grid.Row="2" Orientation="Vertical" Background="Transparent"/>
                <common:NotifyingStackPanel Name="PART_TopPanel" Grid.Column="1" Grid.Row="0" Orientation="Vertical" Background="Transparent"/>
            </common:NotifyingGrid>

            <common:NotifyingCanvas Name="PART_ParallelCanvas" Grid.Column="1" Grid.Row="1"/>

            <common:NotifyingStackPanel Name="PART_FooterPanel" Orientation="Vertical" Grid.Row="2"/>
        </common:NotifyingGrid>
    </ControlTemplate>
</ResourceDictionary>